<?php

class AboutController extends Controller {
    public $cssFile = '/css/about.css';
    
	public function actionIndex() {
		$this->logPageView();
        $title = 'About Us';
        $content = '';
        
        $connection = Yii::app()->db;
        $command = $connection->createCommand('SELECT * FROM pages WHERE id=:id AND hidden = 0');
        $pages = $command->queryALL(true, array(':id' => 1));
        
        if (count($pages)) {
            $page = $pages[0];
            $title = $page['title'];
            $content = $page['content'];
        }
        
        $this->pageTitle = Yii::app()->name . ' - ' . rtrim($title, '.');
        
		$this->render('index', array(
            'title' => $title,
            'content' => $content
        ));
	}
}